<template>
  <div class="container">
    <div class="container-head flex_btw">
      <div class="head-title flex_x">
        <img class="head-icon" src="@/assets/images/data.png" alt="" />
        <span>任务处理</span>
      </div>
    </div>
    <div class="container-main">
      <el-form :model="formList" label-width="auto" size="large">
        <el-form-item label="名称：">
          <el-col :span="10"> A品牌2天不开单店铺预任务</el-col>
        </el-form-item>
        <el-form-item label="严重程度："> 严重 </el-form-item>
        <el-form-item label="任务状态："> 临期 </el-form-item>
        <el-form-item label="任务内容：">
          A品牌的华阳店已经2天没有开单，如下是店铺这两天的相关指标数据：
          进店数：10，进店数环比：-15% 试衣率：20%，试衣率环比：-10%
          请尽快分析原因处理
        </el-form-item>
        <el-form-item label="附件："> 附件.pdf </el-form-item>
        <el-form-item label="任务进度：">
          <el-col :span="18">
            <el-table
              :data="tableData"
              style="width: 100%"
              header-cell-class-name="table_head_s"
            >
              <el-table-column prop="date" label="时间轴" />
              <el-table-column prop="name" label="开始" />
              <el-table-column prop="yxb" label="营销部" />
            </el-table>
          </el-col>
        </el-form-item>
        <el-form-item label="处理反馈：">
          <el-col :span="18">
            <el-input v-model="formList.con" type="textarea" :rows="3" />
          </el-col>
        </el-form-item>
        <el-form-item label="上传附件：">
          <el-upload
            v-model:file-list="fileList"
            class="upload-demo"
            action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
            multiple
            :on-preview="handlePreview"
            :on-remove="handleRemove"
            :before-remove="beforeRemove"
            :limit="3"
            :on-exceed="handleExceed"
          >
            <el-button type="primary">上传文件</el-button>
            <template #tip>
              <div class="el-upload__tip">
                支持扩展名:.rar .zip .doc .docx.pdf jpg.
              </div>
            </template>
          </el-upload>
        </el-form-item>
      </el-form>
      <div class="flex_c">
        <el-button size="large" @click="router.back()">取消</el-button>
        <el-button size="large" type="primary" @click="onSubmit"
          >保存</el-button
        >
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { Search } from "@element-plus/icons-vue";
import { useRouter } from "vue-router";
import { Plus, Minus } from "@element-plus/icons-vue";
const router = useRouter();
const params = ref("");
const formList = reactive({
  name: "",
  target: "指标单数",
  range: "店铺",
  store: "",
  limit: "",
  limitNum: "0",
  date: "",
  warn: "",
  con: "",
  bm: "",
  zw: "",
  yg: "",
});
const tableData = [
  {
    date: '2024-1-2 02：00',
    name: '由"A品牌2天不开单店铺预警"生成'
  },
  {
    date: '2024-1-3 10：42',
    name: '',
    yxb: '华阳店铺店长张三回复：收到任务，正在进行分析问题原因'
  }
]
const onSubmit = () => {
  console.log("submit!");
};
</script>
<style lang="scss" scoped></style>
